Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbox2d.dynamics.joints
Class DistanceJointDef

    java.lang.Object
      org.jbox2d.dynamics.joints.JointDef
          org.jbox2d.dynamics.joints.DistanceJointDef

    public class DistanceJointDef

extends JointDef

Definition for a distance joint. A distance joint keeps two points on two bodies at a constant distance from each other.

Field Summary
`float` | `length` The equilibrium length between the anchor points.
`Vec2` | `localAnchor1` The local anchor point relative to body1's origin.
`Vec2` | `localAnchor2` The local anchor point relative to body2's origin.

Fields inherited from class org.jbox2d.dynamics.joints.JointDef
`body1, body2, collideConnected, type, userData`

Constructor Summary
`DistanceJointDef()`

Method Summary
`void` | `initialize(Body b1, Body b2, Vec2 anchor1, Vec2 anchor2)` Initialize the bodies, anchors, and length using the world anchors.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### localAnchor1

    public Vec2 localAnchor1

  The local anchor point relative to body1's origin.

### localAnchor2

    public Vec2 localAnchor2

  The local anchor point relative to body2's origin.

### length

    public float length

  The equilibrium length between the anchor points.

Constructor Detail

### DistanceJointDef

    public DistanceJointDef()

Method Detail

### initialize

    public void initialize(Body b1,
                           Body b2,
                           Vec2 anchor1,
                           Vec2 anchor2)

  Initialize the bodies, anchors, and length using the world anchors.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD